
<body xmlns="http://www.w3.org/1999/xhtml">
	<h3 align="center"><big>Search</big></h3>
<?php
echo $this->Form->create('Tweet');
echo $this->Form->input('Search' , array());
echo $this->Form->input('TypeOfSearch', array('type'=>'select','options'=> array('Search For Tweets','Search For People'))); 
echo $this->Form->end('Search');
?>

<table>
    <tr>
        <td><h3 align="center" style="color:#000A2E"><big>Search Results</big></h3></td>
    </tr>

<tr><?php  foreach($users as $user): ?>
<td><h3><?php echo $this->Html->image($user['ProfilePic']) ?></h3>
	<h3> <?php echo $this->Html->link($user['ScreenName'], array('action'=>'userview' , $user['ScreenName'],$user['name'] , $user['description'] ,$user['key'] , $user['accountID'] )) ?></h3>
	<h4>Name : <?php echo $user['name'] ?></h4>
	<h5><?php echo $user['description'] ?></h5>
	<h5 style="color:#000A2E">Tweets : <?php echo $user['NumOfTweets'] ?></h5>
	<h5 style="color:#000A2E">Followers : <?php echo $user['NumOfFollowers'] ?></h5>
	<?php if($user['following'] == false || $user['following'] == null )
		echo $this->Html->image('https://si0.twimg.com/images/dev/cms/intents/bird/bird_blue/bird_16_blue.png').' '.$this->Html->link('Follow', array('controller' => 'accounts', 'action' => 'follow', ($user['ScreenName']), 0));
		 else  echo $this->Html->image('https://si0.twimg.com/images/dev/cms/intents/bird/bird_blue/bird_16_blue.png').' '.$this->Html->link('Unfollow', array('controller' => 'accounts', 'action' => 'unfollow', ($user['ScreenName']), 0)); ?>


</td>

</tr>
<?php endforeach; ?>
</table>

</body>